home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inside Indy 1993
/
Inside Indy 1993.iso
/
scripts
/
startgis
< prev
next >
Wrap
Text File
|
1993-06-23
|
2KB
|
134 lines
#!/bin/sh
# ../scripts/start*
# starting from CDROM/slides directory
#
PATH=/bin:/usr/bin:/usr/sbin
case $0
in
"../scripts/startgis")
INDYDEMODIR=GIS
space=22
RUNDEMO=interactdemo
;;
"../scripts/startchem")
INDYDEMODIR=CHEM
space=25
RUNDEMO=highres
;;
"../scripts/startcase")
INDYDEMODIR=WorkShop
space=19
RUNDEMO="startcasedemo"
;;
"../scripts/startgl")
INDYDEMODIR=GL
space=14
RUNDEMO=powerflip.sh
;;
"../scripts/starttrain")
INDYDEMODIR=TRAIN
space=69
RUNDEMO=trainer.script
;;
*)
INDYDEMODIR=GL
space=14
RUNDEMO="inform \"Error\: No Demo Selected\!\""
inform "Error: No Demo Selected!"
exit 1
;;
esac
if ( test "$INDYTMPDIR" = "" ) ; then
INDYTMPDIR=/usr/tmp
fi
# ask if user want to load files
ans=`/usr/sbin/confirm -b "Loaded" -b "Don't Load" -b "Load Now" \
-t "The data for this demo are not loaded." \
-t "It takes approximately ${space}MB of disk space." \
-t "Would you like to load them now?" `
case $ans
in
"Load Now")
runfrom=disk
if ( test -d $INDYTMPDIR/$INDYDEMODIR ) ; then
inform "Directory exist, data may already be loaded."
else
inform "Copying data..." &
save=$!
cp -r ../demos/$INDYDEMODIR $INDYTMPDIR
if ( test $? -ne 0 ) ; then
kill $save
inform "Not enough disk space!"
exit 1
fi
kill $save
fi
;;
"Don't Load")
ans=`/usr/sbin/confirm -b "Yes" -b "Don't Run" \
-t "Would you like to run demo from CDROM? It will be very slow!" `
case $ans
in
"Yes")
runfrom=cdrom
;;
*)
exit 0
;;
esac
;;
"Loaded")
runfrom=disk
;;
esac
#change to demo dir
savedir=`pwd`
if ( test "$runfrom" = "disk" ) ; then
if ( test -d $INDYTMPDIR/$INDYDEMODIR ) ; then
cd $INDYTMPDIR/$INDYDEMODIR
else
inform "Error: Demo not loaded!"
exit 1
fi
else
cd ../demos/$INDYDEMODIR
fi
#check demo; rundemo
if ( test -f ./$RUNDEMO ) ; then
./$RUNDEMO
else
inform "Error: Demo not loaded!"
exit 1
fi
#change back to original dir
cd $savedir
#after run ask if user want to remove
if ( test "$runfrom" = "disk" ) ; then
ans=`confirm -b "No" -b "Remove" \
-t "The data for this demo are not removed." \
-t "Would you like to remove them now?" `
fi
case $ans
in
"Remove")
inform "Removing data!" &
save=$!
rm -rf $INDYTMPDIR/$INDYDEMODIR
kill $save
;;
*)
;;
esac
exit 0